package com.littcore.saap.personal.web;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.context.request.WebRequest;
import org.springframework.web.servlet.ModelAndView;

import com.littcore.common.BeanManager;
import com.littcore.exception.NotLoginException;
import com.littcore.module.annotation.Func;
import com.littcore.saap.common.vo.LoginUserVo;
import com.littcore.saap.core.web.util.LoginUtils;
import com.littcore.saap.message.biz.IUserMessageBizService;
import com.littcore.saas.rest.personal.MyMessageServiceController;


/**
 * .
 * 
 * <pre><b>描述：</b>
 *    
 * </pre>
 * 
 * <pre><b>修改记录：</b>
 *    
 * </pre>
 * 
 * @author <a href="mailto:littcai@hotmail.com">蔡源</a>
 * @since 2015年12月7日
 * @version 1.0
 */
@Controller
public class MyMessageController extends MyMessageServiceController {
  
  @Resource IUserMessageBizService userMessageBizService;
  
  @Func(moduleCode="personal.myMessage", funcCode="query", enableLog=false)
  @RequestMapping 
  public ModelAndView index(WebRequest request, ModelMap modelMap) throws NotLoginException
  { 
    LoginUserVo loginUser = (LoginUserVo)LoginUtils.getLoginVo();
    String moduleCode = request.getParameter("moduleCode");
    String moduleName = moduleCode==null?"":BeanManager.getMessage("message.module."+moduleCode, loginUser.toLocale());
    return new ModelAndView("/personal/myMessage/index").addObject("moduleName", moduleName);  
  
  }

}
